package com.zr.controller;

import com.zr.entity.Dept;
import com.zr.mapper.DeptMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author ：Zhang
 * @date ：Created in 2024/12/19 14:02
 * @description：
 * @modified By：
 * @version:
 */
@Controller
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    private DeptMapper deptMapper;

    @RequestMapping("listDept")
    @ResponseBody
    public List<Dept> listDept(){
        return deptMapper.selectAll();
    }

}
